//
//  ComRes.m
//  MiaoTu
//
//  Created by dllo on 16/09/19
//  Copyright (c) dllo. All rights reserved.
//

#import "ComRes.h"
#import "Resfacilities.h"
#import "Yueyou.h"

@implementation ComRes

- (void)setValue:(id)value forKey:(NSString *)key {
    [super setValue:value forKey:key];
    if ([key isEqualToString:@"ResFacilities"]) {
        NSMutableArray<Resfacilities *> *resArray = [NSMutableArray array];
        for (NSDictionary *dic in value) {
            Resfacilities *res = [Resfacilities modelWithDic:dic];
            [resArray addObject:res];
        }
        _ResFacilities = resArray;
    }
    if ([key isEqualToString:@"Yueyou"]) {
        _Yueyou = [Yueyou modelWithDic:value];
    }
}

+ (NSDictionary *)objectClassInArray{
    return @{@"ResFacilities" : [Resfacilities class]};
}

@end
